<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:65:"/var/www/html/CRM/public/../application/admin/view/prep/prep.html";i:1541073239;}*/ ?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>预科管理</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
	<script type="text/javascript" src="/admin/layer/layer.js"></script>
<script type="text/javascript" src="/admin/laydate/laydate.js"></script>
</head>
<style>
	.vsAdd{
		display: inline-block;
		width: 70px;
		height: 25px;
		border-radius: 8px;
		background-color: #2a9cdd;
		line-height: 25px;
		color: #fff;
		cursor: pointer;
		text-align: center;
	}
	.td{
		height: 40px;
	}
	.imgv{
		vertical-align: middle;
	}

	/*分页样式*/
	.pagination>li{
		float: left;
		text-align: center;
		border-radius: 5px;
	}
	.pagination>li:hover{
		background-color: #47a4e1;
	}
	.pagination>li:hover>span{
		color: white;
	}
	.pagination>li>a{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination>li>span{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		color: #47a4e1;
		font-weight: bold;
		font-size: 18px;
	}
	.pagination>li.disabled{
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination{
		width:auto;
		height: 100%;
		margin: 0 auto;
	}

</style>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">预科人员管理</a>&nbsp;-</span>&nbsp;人员管理
			</div>
		</div>

		<div class="page">
			<!-- banner页面样式 -->
			<div class="connoisseur">
				<div class="conform">
						<div class="cfD">
							<a class="addA" style="margin-top: 0;margin-left: 0;" href="javascript:;" onclick="groups()">批量分组</a>
						</div>
				</div>
				<div class="conShow"><table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="135px" class="tdColor">
								<input type="checkbox" id="allChecks"  onclick="ckAll()">全选
							</td>
							<td width="135px" class="tdColor tdC">序号</td>
							<td width="135px" class="tdColor">姓名</td>
							<td width="145px" class="tdColor">试岗时间</td>
							<td width="140px" class="tdColor">试岗情况</td>
							<td width="140px" class="tdColor">是否离开</td>
							<td width="140px" class="tdColor">备注</td>
							<td width="140px" class="tdColor">流失原因</td>
							<!--<td width="140px" class="tdColor">分组情况</td>-->
							<td width="250px" class="tdColor">操作</td>
						</tr>
                        <?php if(is_array($result) || $result instanceof \think\Collection || $result instanceof \think\Paginator): $i = 0; $__LIST__ = $result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<tr class="td">
							<td>
								<input type="checkbox" class="adaa" data-id="<?php echo $vo['job_id']; ?>" name="check">
							</td>
							<td><?php echo $key+1; ?></td>
							<td><?php echo $vo['job_name']; ?></td>
							<td><?php echo $vo['job_try_time']; ?></td>
							<td><?php echo $vo['job_try_condition']; ?></td>
							<td id="getout"><?php echo $vo['job_getout_sn']; ?></td>
							<td><?php echo $vo['job_try_text']; ?></td>
							<td><?php echo $vo['job_getout_text']; ?></td>
							<td><a href="<?php echo url('admin/prep/preupdate',['job_id'=>$vo['job_id']]); ?>" class="vsAdd">修改</a>
							    <a href="javascript:;" onclick="group(id=<?php echo $vo['job_id']; ?>)"  class="vsAdd">分组</a>
								<a href="javascript:;" onclick="detaile(id=<?php echo $vo['job_id']; ?>)" class="vsAdd">查看详情</a>
							</td>
						</tr>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
					</table>
					<div class="paging" style="margin-top: 20px; height: 2rem;">
						<?php echo $result->render(); ?>
					</div>
				</div>
				<!-- banner 表格 显示 end-->
			</div>
			<!-- banner页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="/admin/img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="#" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
	function groups(){
	    var id=[];
	    $(".adaa").each(function(){
	        if($(this).is(':checked')){
                id.push($(this).data("id"));
			}
		});	    if(id==''){
	       alert('请选择分组学生');return false;
		}
	    console.log(id);
        layer.open({
            type:2,
            area: ['450px', '400px'],
            fixed: true, //不固定
            maxmin: true,
            content: "pregroups?job_id="+id,
        });
	}
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
<script>
    function detaile(id){
        layer.open({
            type:2,
            area: ['700px', '450px'],
            fixed: false, //不固定
            maxmin: true,
            content: "test?job_id="+id,
        });
    }

    function group(id){
//       var a = $('#getout').text();
//       console.log(a);
//       if (a =='离开'){
//           alert('离开的学员不能进行分组');return false;
//	   }
        layer.open({
            type:2,
            area: ['450px', '400px'],
            fixed: true, //不固定
            maxmin: true,
            content: "pregroup?job_id="+id,
        });
    }

    //全选js事件
    function ckAll(){
        var flag=document.getElementById("allChecks").checked;
        var cks=document.getElementsByName("check");
        for(var i=0;i<cks.length;i++){
            cks[i].checked = flag;
        }
    }
</script>
</html>